package gov.pbc.nn.kjgl.archive.view;


import java.io.IOException;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.data.provider.Criteria;
import com.bstek.dorado.data.provider.Page;
import com.bstek.dorado.uploader.DownloadFile;
import com.bstek.dorado.uploader.annotation.FileProvider;

import gov.pbc.nn.kjgl.archive.dao.ArchivesContentDao;
import gov.pbc.nn.kjgl.archive.dao.ArchivesJdbcDao;
import gov.pbc.nn.kjgl.entity.Archives;
import gov.pbc.nn.kjgl.entity.ArchivesContent;

@Component
public class ArchivesContentPR {

	@Autowired
	private ArchivesContentDao archivesContentDao;
	
	@Autowired 
	private ArchivesJdbcDao archivesJdbcDao;

//	@DataProvider
//	public void getAcontent(Page<ArchivesContent> page) {
//		archivesContentDao.getAcontent(page);
//	}
//	@FileProvider
//	public DownloadFile download(Map<String, String> parameter)
//			throws IOException {
//		return archivesContentDao.download(parameter);
//	}
	
	@DataProvider 
	public void  loadArchivesContent(Page<ArchivesContent> page, Criteria criteria){
		archivesJdbcDao.loadArchivesContent(page, criteria);
	}
	
	@DataProvider
	public String getArchives(String archivesId) {
		 return archivesContentDao.getArchives(archivesId);
	}
	
//	@DataProvider
//	public String getArchivesCountName(String id) {
//		 return archivesContentDao.getArchivesCountName(id);
//	}
}
